package neo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import neo.service.MLogService;

@Controller
@RequestMapping("/mlog")
public class MLogController {
	
	@Autowired
	private MLogService mlogService;
	
	@RequestMapping("/list")
	public ModelAndView list(@RequestParam(value="id",required=false)String id){
		ModelAndView mav=new ModelAndView();
		
		mav.addObject("mlogs", mlogService.findByDevId(Integer.parseInt(id)));
		mav.setViewName("/mlog/list");
		return mav;
	}

}
